package com.example.project.Service.Impl;

import com.example.project.Entity.User;
import com.example.project.Mapper.UserMapper;
import com.example.project.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("UserService")
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;
    @Override
    public User QueryByName(User user)
    {
        return userMapper.UserQuery(user);
    }

    @Override
    public User SelectSameName(User user) {
        User user1 = userMapper.UserQuery(user);
        return user1;
    }

    @Override
    public void UserAdd(User user) {
        userMapper.UserAdd(user);
    }

    @Override
    public void setCode(String code) {
        userMapper.setCode(code);
    }

    @Override
    public String getCode() {
         String code=userMapper.getCode();
        return code;
    }

}
